1. Field of the Invention
The present invention relates to a magnetic card reader that carries out at least either of reading and writing magnetic data recorded in a card-like medium made of paper, plastic, and the like; as well a magnetic data reading method.
2. Description of Related Art
Since early times, a card-like medium; for example a credit card, a pre-paid card, a cash card and the like; includes magnetic data such as specific information recorded in a magnetic stripe formed on the card-like medium. Used for recording magnetic data into such a card-like medium is, for example, a frequency modulation (FM) method (F2F method) that makes use of a combination of two types of frequencies. For regenerating magnetic data recorded with such a frequency modulation (FM) method, a magnetic head relatively slides with respect to the magnetic stripe of the card-like medium to acquire the magnetic data as analog signals, which are subsequently converted (demodulated) into digital signals, and then taken into a CPU (a decoding section) (Refer to Patent Document 1). In the case of a magnetic card reader disclosed in Patent Document 1, analog signals output from the magnetic head and amplified through a amplifying section are then demodulated in an F2F demodulating section so as to output a card transfer signal, a clock signal, and a data signal.
Generally speaking, in a magnetic card reader of a swiping operation type (by a manual transfer method), resources such as a memory are often provided with restriction in order to materialize an inexpensive configuration (i.e., a magnetic card reader equipped with a small size of memory is used). Therefore, occasionally the size (capacity) of a buffer for storing magnetic data cannot include a sufficient allowance (margin). If once the size of magnetic data read exceeds the size of the buffer, the excessive part of the magnetic data read is omitted, and meanwhile the part of the magnetic data stored in the buffer is transmitted to a higher-level device unconditionally.
Furthermore, in the case of the magnetic card reader disclosed in Patent Document 1, a certain amount of bit data is thrown out (omitted) hardware-wise at the start of reading a magnetic card for the purpose of removing an unstable factor at an initial stage of operation. The unstable factor includes mechanical vibrations generated at the time when the magnetic card and a magnetic head contact each other, as well as electrical noises from a surrounding environment. More specifically to describe, if a noise exists at the top of an analog signal, an F2F demodulating section of the magnetic card reader identifies the noise part as a top part of a preamble and carries out omitting the part. The number of data (i.e., the number of bits) to be omitted hardware-wise (hereinafter, called the number of data for omission) is specified with an optimum value according to data accumulated experimentally and empirically.
Patent Document 1: Japanese Unexamined Patent Application Publication No. 2007-250142 (Paragraph [0015])
However, in the case of a magnetic card reader in which data stored in a buffer is unconditionally transmitted to a higher-level device, there exists a problem of environment resistance. In a radio-wave test (an immunity test) in which radio-waves of a certain frequency range are continually transmitted, the magnetic card reader affected by radiation in sympathetic vibration with a circuit constant may misjudge that it has received magnetic data, and it stores the magnetic data into the buffer. Eventually, though the magnetic data itself is meaningless, the magnetic data stored in the buffer is unconditionally transmitted from the magnetic card reader to the higher-level device. As a result, an error handling operation is carried out in the higher-level device. When the magnetic card reader is installed under the same environment as the radio-wave test, the higher-level device needs to carry out error handling operation so frequently that consequently the environment resistance performance such as resistance against radio-waves, resistance against noises, and the like becomes worsened. Furthermore, when the higher-level device is frequently requested to carry out the error handling operation, the operation stability of the system may be weakened.
However, if omitting the data is carried out uniformly and simply with a predefined number of data for omission, there appears a lack of operation stability at the time of reading magnetic data. That is to say; a large number of data for omission results in an improvement in error resistance, however on the other hand, an excessively large number of data for omission may cause even an omission of effective magnetic data. As described above, the number of data for omission is specified with an optimum value according to data accumulated experimentally and empirically. However, since the magnetic data omitted cannot be reproduced anymore, it is preferable in reality to specify the number of data for hardware-wise omission as small as possible (though excessively reducing the number of data for omission simply results in worsened error resistance by contraries).
Moreover, in the case where exists ineffective magnetic data, the number of which being greater than the specified number of data for omission, due to effects of a noise and the like for example, there also lies a problem that a next operation step proceeds. Specifically to describe, when ineffective magnetic data is read, wherein the number of the magnetic data being greater than the specified number of data for hardware-wise omission (the predefined number of magnetic data (the number of bits)), a next operation step proceeds without any judgment on the excessive part of the ineffective magnetic data about whether the part of the magnetic data is effective or not. Then the excessive part of the magnetic data is detected to be ineffective after completion of decoding operation in a higher-level device connected to the magnetic card reader. Therefore, when an error is detected in the higher-level device, a user is requested to carry out operation (for example, man-made operation) again, and it means that the system is poor in its operation performance.